$(function () {
	$('#confirmDelete').dialog({
		autoOpen: false,
		width: 300,
		modal: true,
		title: 'confirm delete',
		buttons: {
			"Ok": function() {
				var dlg = $(this); 
				dlg.dialog("close"); 
				document.location.href = dlg.data('deleteUrl');  
			}, 
			"Cancel": function() { 
				$(this).dialog("close"); 
			} 
		}
	}); 
});

function confirmDelete(deleteUrl, name) {
	$('#nameToDelete').html(name);
	var dlg = $('#confirmDelete');
	dlg.data('deleteUrl', deleteUrl);
	dlg.dialog('open');
}
